package com.berchina.controller.admin;

import com.berchina.bean.Master;
import com.berchina.service.MasterService;
import com.berchina.util.JsonData;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/master")
public class MasterController {
    @Autowired
    private MasterService masterService;
    @RequestMapping("/selectList")
    public Object selectList(@RequestParam(value = "page",defaultValue = "1")Integer page,
                             @RequestParam(value = "limit",defaultValue = "1")Integer limit){
        PageInfo<Master> pageInfo=masterService.findMasterPage(page,limit);
        return JsonData.buildSuc(pageInfo);
    }
}
